package test;

import java.io.File;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;

public class XMLReader {
	public static void main(String[] args) {
		String xmlFile = "D:\\qqvideo.xml";

		try{
			DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
			Document doc = db.parse(new File(xmlFile));

			System.out.println(doc.getDocumentElement().getTagName());
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
